{
 "cells": [
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "## 删除空格或特定字符",
   "id": "b512d1471fb9f88f"
  },
  {
   "metadata": {},
   "cell_type": "code",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'今天天气不错的，挺风和日丽'"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 9,
   "source": [
    "input_str = ' 今天天气不错的，挺风和日丽 '\n",
    "input_str.strip()#去除首尾的空格"
   ],
   "id": "initial_id"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-15T06:04:25.020109Z",
     "start_time": "2025-09-15T06:04:25.014081Z"
    }
   },
   "cell_type": "code",
   "source": "input_str.rstrip()#去除末尾的空格",
   "id": "c4f7f79a4daf68bf",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "' 今天天气不错的，挺风和日丽'"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 10
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-15T06:04:25.027308Z",
     "start_time": "2025-09-15T06:04:25.021473Z"
    }
   },
   "cell_type": "code",
   "source": "input_str.lstrip()#去除句首的空格",
   "id": "ce764664a14cee59",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'今天天气不错的，挺风和日丽 '"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 11
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-15T06:04:25.034316Z",
     "start_time": "2025-09-15T06:04:25.029316Z"
    }
   },
   "cell_type": "code",
   "source": [
    "input_str = 'AAA今天天气不错的，挺风和日丽AAA'\n",
    "input_str.strip('A')#去除首尾的A字符"
   ],
   "id": "397a9c42f1760583",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'今天天气不错的，挺风和日丽'"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 12
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-15T06:04:25.040299Z",
     "start_time": "2025-09-15T06:04:25.034821Z"
    }
   },
   "cell_type": "code",
   "source": "input_str.rstrip('A')#去除末尾的A字符",
   "id": "3a59491f2db6f96a",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'AAA今天天气不错的，挺风和日丽'"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 13
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-15T06:04:25.046779Z",
     "start_time": "2025-09-15T06:04:25.041308Z"
    }
   },
   "cell_type": "code",
   "source": "input_str.lstrip('A')#去除句首的A字符",
   "id": "cd8949e972a44b51",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'今天天气不错的，挺风和日丽AAA'"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 14
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "## 替换操作",
   "id": "c853e38b344fbedc"
  },
  {
   "metadata": {},
   "cell_type": "code",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'AAA昨天天气不错的，挺风和日丽AAA'"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 15,
   "source": "input_str.replace('今天', '昨天')#替换今天为昨天",
   "id": "8a892a5ade49ecf0"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-15T06:06:00.314308Z",
     "start_time": "2025-09-15T06:06:00.309707Z"
    }
   },
   "cell_type": "code",
   "source": "input_str.replace('今天', '')#替换今天为空，相当于删除今天",
   "id": "e88085ecfcfd9a8",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'AAA天气不错的，挺风和日丽AAA'"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 16
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "## 查找操作",
   "id": "9aeaf9233303c019"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-15T06:07:55.436034Z",
     "start_time": "2025-09-15T06:07:55.431021Z"
    }
   },
   "cell_type": "code",
   "source": "input_str.find('今天')#查找今天字符的位置（下标从0开始）",
   "id": "aeb41a048eaf62f3",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 17
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "## 判断操作",
   "id": "f8aa7a116f694aed"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-15T06:09:34.395334Z",
     "start_time": "2025-09-15T06:09:34.387778Z"
    }
   },
   "cell_type": "code",
   "source": "input_str.isalpha()#检查字符串是否只包含字母。如果字符串至少有一个字符并且所有字符都是字母，则返回 True，否则返回 False。",
   "id": "b652b44400cb78d7",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "False"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 18
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-15T06:10:10.491611Z",
     "start_time": "2025-09-15T06:10:10.486741Z"
    }
   },
   "cell_type": "code",
   "source": "input_str.isdigit()#检测字符串是否只由数字组成。",
   "id": "6ce5a3a20f7ca4e1",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "False"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 19
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "## 分割合并操作",
   "id": "6b095f22b97f4874"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-15T06:14:09.105683Z",
     "start_time": "2025-09-15T06:14:09.101513Z"
    }
   },
   "cell_type": "code",
   "source": [
    "input_str = '今天 天气 不错的，挺 风和日丽 的'\n",
    "input_str.split(' ')#用空格作为标识进行分割"
   ],
   "id": "cb68c4b59a136efc",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['今天', '天气', '不错的，挺', '风和日丽', '的']"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 25
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-15T06:14:09.827407Z",
     "start_time": "2025-09-15T06:14:09.822039Z"
    }
   },
   "cell_type": "code",
   "source": [
    "input_str = input_str.split(' ')\n",
    "input_str"
   ],
   "id": "b6f7e81bfed4d8e3",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['今天', '天气', '不错的，挺', '风和日丽', '的']"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 26
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-15T06:14:26.408732Z",
     "start_time": "2025-09-15T06:14:26.405214Z"
    }
   },
   "cell_type": "code",
   "source": "' '.join(input_str)#用空格再连接",
   "id": "de6bd67082bb0cb0",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'今天 天气 不错的，挺 风和日丽 的'"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 28
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "## 帮助文档",
   "id": "e7b9ed2c2b78058d"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-15T06:15:45.210013Z",
     "start_time": "2025-09-15T06:15:45.195679Z"
    }
   },
   "cell_type": "code",
   "source": "help(str)",
   "id": "a57b480447a0c830",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on class str in module builtins:\n",
      "\n",
      "class str(object)\n",
      " |  str(object='') -> str\n",
      " |  str(bytes_or_buffer[, encoding[, errors]]) -> str\n",
      " |\n",
      " |  Create a new string object from the given object. If encoding or\n",
      " |  errors is specified, then the object must expose a data buffer\n",
      " |  that will be decoded using the given encoding and error handler.\n",
      " |  Otherwise, returns the result of object.__str__() (if defined)\n",
      " |  or repr(object).\n",
      " |  encoding defaults to sys.getdefaultencoding().\n",
      " |  errors defaults to 'strict'.\n",
      " |\n",
      " |  Methods defined here:\n",
      " |\n",
      " |  __add__(self, value, /)\n",
      " |      Return self+value.\n",
      " |\n",
      " |  __contains__(self, key, /)\n",
      " |      Return bool(key in self).\n",
      " |\n",
      " |  __eq__(self, value, /)\n",
      " |      Return self==value.\n",
      " |\n",
      " |  __format__(self, format_spec, /)\n",
      " |      Return a formatted version of the string as described by format_spec.\n",
      " |\n",
      " |  __ge__(self, value, /)\n",
      " |      Return self>=value.\n",
      " |\n",
      " |  __getattribute__(self, name, /)\n",
      " |      Return getattr(self, name).\n",
      " |\n",
      " |  __getitem__(self, key, /)\n",
      " |      Return self[key].\n",
      " |\n",
      " |  __getnewargs__(...)\n",
      " |\n",
      " |  __gt__(self, value, /)\n",
      " |      Return self>value.\n",
      " |\n",
      " |  __hash__(self, /)\n",
      " |      Return hash(self).\n",
      " |\n",
      " |  __iter__(self, /)\n",
      " |      Implement iter(self).\n",
      " |\n",
      " |  __le__(self, value, /)\n",
      " |      Return self<=value.\n",
      " |\n",
      " |  __len__(self, /)\n",
      " |      Return len(self).\n",
      " |\n",
      " |  __lt__(self, value, /)\n",
      " |      Return self<value.\n",
      " |\n",
      " |  __mod__(self, value, /)\n",
      " |      Return self%value.\n",
      " |\n",
      " |  __mul__(self, value, /)\n",
      " |      Return self*value.\n",
      " |\n",
      " |  __ne__(self, value, /)\n",
      " |      Return self!=value.\n",
      " |\n",
      " |  __repr__(self, /)\n",
      " |      Return repr(self).\n",
      " |\n",
      " |  __rmod__(self, value, /)\n",
      " |      Return value%self.\n",
      " |\n",
      " |  __rmul__(self, value, /)\n",
      " |      Return value*self.\n",
      " |\n",
      " |  __sizeof__(self, /)\n",
      " |      Return the size of the string in memory, in bytes.\n",
      " |\n",
      " |  __str__(self, /)\n",
      " |      Return str(self).\n",
      " |\n",
      " |  capitalize(self, /)\n",
      " |      Return a capitalized version of the string.\n",
      " |\n",
      " |      More specifically, make the first character have upper case and the rest lower\n",
      " |      case.\n",
      " |\n",
      " |  casefold(self, /)\n",
      " |      Return a version of the string suitable for caseless comparisons.\n",
      " |\n",
      " |  center(self, width, fillchar=' ', /)\n",
      " |      Return a centered string of length width.\n",
      " |\n",
      " |      Padding is done using the specified fill character (default is a space).\n",
      " |\n",
      " |  count(...)\n",
      " |      S.count(sub[, start[, end]]) -> int\n",
      " |\n",
      " |      Return the number of non-overlapping occurrences of substring sub in\n",
      " |      string S[start:end].  Optional arguments start and end are\n",
      " |      interpreted as in slice notation.\n",
      " |\n",
      " |  encode(self, /, encoding='utf-8', errors='strict')\n",
      " |      Encode the string using the codec registered for encoding.\n",
      " |\n",
      " |      encoding\n",
      " |        The encoding in which to encode the string.\n",
      " |      errors\n",
      " |        The error handling scheme to use for encoding errors.\n",
      " |        The default is 'strict' meaning that encoding errors raise a\n",
      " |        UnicodeEncodeError.  Other possible values are 'ignore', 'replace' and\n",
      " |        'xmlcharrefreplace' as well as any other name registered with\n",
      " |        codecs.register_error that can handle UnicodeEncodeErrors.\n",
      " |\n",
      " |  endswith(...)\n",
      " |      S.endswith(suffix[, start[, end]]) -> bool\n",
      " |\n",
      " |      Return True if S ends with the specified suffix, False otherwise.\n",
      " |      With optional start, test S beginning at that position.\n",
      " |      With optional end, stop comparing S at that position.\n",
      " |      suffix can also be a tuple of strings to try.\n",
      " |\n",
      " |  expandtabs(self, /, tabsize=8)\n",
      " |      Return a copy where all tab characters are expanded using spaces.\n",
      " |\n",
      " |      If tabsize is not given, a tab size of 8 characters is assumed.\n",
      " |\n",
      " |  find(...)\n",
      " |      S.find(sub[, start[, end]]) -> int\n",
      " |\n",
      " |      Return the lowest index in S where substring sub is found,\n",
      " |      such that sub is contained within S[start:end].  Optional\n",
      " |      arguments start and end are interpreted as in slice notation.\n",
      " |\n",
      " |      Return -1 on failure.\n",
      " |\n",
      " |  format(...)\n",
      " |      S.format(*args, **kwargs) -> str\n",
      " |\n",
      " |      Return a formatted version of S, using substitutions from args and kwargs.\n",
      " |      The substitutions are identified by braces ('{' and '}').\n",
      " |\n",
      " |  format_map(...)\n",
      " |      S.format_map(mapping) -> str\n",
      " |\n",
      " |      Return a formatted version of S, using substitutions from mapping.\n",
      " |      The substitutions are identified by braces ('{' and '}').\n",
      " |\n",
      " |  index(...)\n",
      " |      S.index(sub[, start[, end]]) -> int\n",
      " |\n",
      " |      Return the lowest index in S where substring sub is found,\n",
      " |      such that sub is contained within S[start:end].  Optional\n",
      " |      arguments start and end are interpreted as in slice notation.\n",
      " |\n",
      " |      Raises ValueError when the substring is not found.\n",
      " |\n",
      " |  isalnum(self, /)\n",
      " |      Return True if the string is an alpha-numeric string, False otherwise.\n",
      " |\n",
      " |      A string is alpha-numeric if all characters in the string are alpha-numeric and\n",
      " |      there is at least one character in the string.\n",
      " |\n",
      " |  isalpha(self, /)\n",
      " |      Return True if the string is an alphabetic string, False otherwise.\n",
      " |\n",
      " |      A string is alphabetic if all characters in the string are alphabetic and there\n",
      " |      is at least one character in the string.\n",
      " |\n",
      " |  isascii(self, /)\n",
      " |      Return True if all characters in the string are ASCII, False otherwise.\n",
      " |\n",
      " |      ASCII characters have code points in the range U+0000-U+007F.\n",
      " |      Empty string is ASCII too.\n",
      " |\n",
      " |  isdecimal(self, /)\n",
      " |      Return True if the string is a decimal string, False otherwise.\n",
      " |\n",
      " |      A string is a decimal string if all characters in the string are decimal and\n",
      " |      there is at least one character in the string.\n",
      " |\n",
      " |  isdigit(self, /)\n",
      " |      Return True if the string is a digit string, False otherwise.\n",
      " |\n",
      " |      A string is a digit string if all characters in the string are digits and there\n",
      " |      is at least one character in the string.\n",
      " |\n",
      " |  isidentifier(self, /)\n",
      " |      Return True if the string is a valid Python identifier, False otherwise.\n",
      " |\n",
      " |      Call keyword.iskeyword(s) to test whether string s is a reserved identifier,\n",
      " |      such as \"def\" or \"class\".\n",
      " |\n",
      " |  islower(self, /)\n",
      " |      Return True if the string is a lowercase string, False otherwise.\n",
      " |\n",
      " |      A string is lowercase if all cased characters in the string are lowercase and\n",
      " |      there is at least one cased character in the string.\n",
      " |\n",
      " |  isnumeric(self, /)\n",
      " |      Return True if the string is a numeric string, False otherwise.\n",
      " |\n",
      " |      A string is numeric if all characters in the string are numeric and there is at\n",
      " |      least one character in the string.\n",
      " |\n",
      " |  isprintable(self, /)\n",
      " |      Return True if the string is printable, False otherwise.\n",
      " |\n",
      " |      A string is printable if all of its characters are considered printable in\n",
      " |      repr() or if it is empty.\n",
      " |\n",
      " |  isspace(self, /)\n",
      " |      Return True if the string is a whitespace string, False otherwise.\n",
      " |\n",
      " |      A string is whitespace if all characters in the string are whitespace and there\n",
      " |      is at least one character in the string.\n",
      " |\n",
      " |  istitle(self, /)\n",
      " |      Return True if the string is a title-cased string, False otherwise.\n",
      " |\n",
      " |      In a title-cased string, upper- and title-case characters may only\n",
      " |      follow uncased characters and lowercase characters only cased ones.\n",
      " |\n",
      " |  isupper(self, /)\n",
      " |      Return True if the string is an uppercase string, False otherwise.\n",
      " |\n",
      " |      A string is uppercase if all cased characters in the string are uppercase and\n",
      " |      there is at least one cased character in the string.\n",
      " |\n",
      " |  join(self, iterable, /)\n",
      " |      Concatenate any number of strings.\n",
      " |\n",
      " |      The string whose method is called is inserted in between each given string.\n",
      " |      The result is returned as a new string.\n",
      " |\n",
      " |      Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'\n",
      " |\n",
      " |  ljust(self, width, fillchar=' ', /)\n",
      " |      Return a left-justified string of length width.\n",
      " |\n",
      " |      Padding is done using the specified fill character (default is a space).\n",
      " |\n",
      " |  lower(self, /)\n",
      " |      Return a copy of the string converted to lowercase.\n",
      " |\n",
      " |  lstrip(self, chars=None, /)\n",
      " |      Return a copy of the string with leading whitespace removed.\n",
      " |\n",
      " |      If chars is given and not None, remove characters in chars instead.\n",
      " |\n",
      " |  partition(self, sep, /)\n",
      " |      Partition the string into three parts using the given separator.\n",
      " |\n",
      " |      This will search for the separator in the string.  If the separator is found,\n",
      " |      returns a 3-tuple containing the part before the separator, the separator\n",
      " |      itself, and the part after it.\n",
      " |\n",
      " |      If the separator is not found, returns a 3-tuple containing the original string\n",
      " |      and two empty strings.\n",
      " |\n",
      " |  removeprefix(self, prefix, /)\n",
      " |      Return a str with the given prefix string removed if present.\n",
      " |\n",
      " |      If the string starts with the prefix string, return string[len(prefix):].\n",
      " |      Otherwise, return a copy of the original string.\n",
      " |\n",
      " |  removesuffix(self, suffix, /)\n",
      " |      Return a str with the given suffix string removed if present.\n",
      " |\n",
      " |      If the string ends with the suffix string and that suffix is not empty,\n",
      " |      return string[:-len(suffix)]. Otherwise, return a copy of the original\n",
      " |      string.\n",
      " |\n",
      " |  replace(self, old, new, count=-1, /)\n",
      " |      Return a copy with all occurrences of substring old replaced by new.\n",
      " |\n",
      " |        count\n",
      " |          Maximum number of occurrences to replace.\n",
      " |          -1 (the default value) means replace all occurrences.\n",
      " |\n",
      " |      If the optional argument count is given, only the first count occurrences are\n",
      " |      replaced.\n",
      " |\n",
      " |  rfind(...)\n",
      " |      S.rfind(sub[, start[, end]]) -> int\n",
      " |\n",
      " |      Return the highest index in S where substring sub is found,\n",
      " |      such that sub is contained within S[start:end].  Optional\n",
      " |      arguments start and end are interpreted as in slice notation.\n",
      " |\n",
      " |      Return -1 on failure.\n",
      " |\n",
      " |  rindex(...)\n",
      " |      S.rindex(sub[, start[, end]]) -> int\n",
      " |\n",
      " |      Return the highest index in S where substring sub is found,\n",
      " |      such that sub is contained within S[start:end].  Optional\n",
      " |      arguments start and end are interpreted as in slice notation.\n",
      " |\n",
      " |      Raises ValueError when the substring is not found.\n",
      " |\n",
      " |  rjust(self, width, fillchar=' ', /)\n",
      " |      Return a right-justified string of length width.\n",
      " |\n",
      " |      Padding is done using the specified fill character (default is a space).\n",
      " |\n",
      " |  rpartition(self, sep, /)\n",
      " |      Partition the string into three parts using the given separator.\n",
      " |\n",
      " |      This will search for the separator in the string, starting at the end. If\n",
      " |      the separator is found, returns a 3-tuple containing the part before the\n",
      " |      separator, the separator itself, and the part after it.\n",
      " |\n",
      " |      If the separator is not found, returns a 3-tuple containing two empty strings\n",
      " |      and the original string.\n",
      " |\n",
      " |  rsplit(self, /, sep=None, maxsplit=-1)\n",
      " |      Return a list of the substrings in the string, using sep as the separator string.\n",
      " |\n",
      " |        sep\n",
      " |          The separator used to split the string.\n",
      " |\n",
      " |          When set to None (the default value), will split on any whitespace\n",
      " |          character (including \\n \\r \\t \\f and spaces) and will discard\n",
      " |          empty strings from the result.\n",
      " |        maxsplit\n",
      " |          Maximum number of splits.\n",
      " |          -1 (the default value) means no limit.\n",
      " |\n",
      " |      Splitting starts at the end of the string and works to the front.\n",
      " |\n",
      " |  rstrip(self, chars=None, /)\n",
      " |      Return a copy of the string with trailing whitespace removed.\n",
      " |\n",
      " |      If chars is given and not None, remove characters in chars instead.\n",
      " |\n",
      " |  split(self, /, sep=None, maxsplit=-1)\n",
      " |      Return a list of the substrings in the string, using sep as the separator string.\n",
      " |\n",
      " |        sep\n",
      " |          The separator used to split the string.\n",
      " |\n",
      " |          When set to None (the default value), will split on any whitespace\n",
      " |          character (including \\n \\r \\t \\f and spaces) and will discard\n",
      " |          empty strings from the result.\n",
      " |        maxsplit\n",
      " |          Maximum number of splits.\n",
      " |          -1 (the default value) means no limit.\n",
      " |\n",
      " |      Splitting starts at the front of the string and works to the end.\n",
      " |\n",
      " |      Note, str.split() is mainly useful for data that has been intentionally\n",
      " |      delimited.  With natural text that includes punctuation, consider using\n",
      " |      the regular expression module.\n",
      " |\n",
      " |  splitlines(self, /, keepends=False)\n",
      " |      Return a list of the lines in the string, breaking at line boundaries.\n",
      " |\n",
      " |      Line breaks are not included in the resulting list unless keepends is given and\n",
      " |      true.\n",
      " |\n",
      " |  startswith(...)\n",
      " |      S.startswith(prefix[, start[, end]]) -> bool\n",
      " |\n",
      " |      Return True if S starts with the specified prefix, False otherwise.\n",
      " |      With optional start, test S beginning at that position.\n",
      " |      With optional end, stop comparing S at that position.\n",
      " |      prefix can also be a tuple of strings to try.\n",
      " |\n",
      " |  strip(self, chars=None, /)\n",
      " |      Return a copy of the string with leading and trailing whitespace removed.\n",
      " |\n",
      " |      If chars is given and not None, remove characters in chars instead.\n",
      " |\n",
      " |  swapcase(self, /)\n",
      " |      Convert uppercase characters to lowercase and lowercase characters to uppercase.\n",
      " |\n",
      " |  title(self, /)\n",
      " |      Return a version of the string where each word is titlecased.\n",
      " |\n",
      " |      More specifically, words start with uppercased characters and all remaining\n",
      " |      cased characters have lower case.\n",
      " |\n",
      " |  translate(self, table, /)\n",
      " |      Replace each character in the string using the given translation table.\n",
      " |\n",
      " |        table\n",
      " |          Translation table, which must be a mapping of Unicode ordinals to\n",
      " |          Unicode ordinals, strings, or None.\n",
      " |\n",
      " |      The table must implement lookup/indexing via __getitem__, for instance a\n",
      " |      dictionary or list.  If this operation raises LookupError, the character is\n",
      " |      left untouched.  Characters mapped to None are deleted.\n",
      " |\n",
      " |  upper(self, /)\n",
      " |      Return a copy of the string converted to uppercase.\n",
      " |\n",
      " |  zfill(self, width, /)\n",
      " |      Pad a numeric string with zeros on the left, to fill a field of the given width.\n",
      " |\n",
      " |      The string is never truncated.\n",
      " |\n",
      " |  ----------------------------------------------------------------------\n",
      " |  Static methods defined here:\n",
      " |\n",
      " |  __new__(*args, **kwargs)\n",
      " |      Create and return a new object.  See help(type) for accurate signature.\n",
      " |\n",
      " |  maketrans(...)\n",
      " |      Return a translation table usable for str.translate().\n",
      " |\n",
      " |      If there is only one argument, it must be a dictionary mapping Unicode\n",
      " |      ordinals (integers) or characters to Unicode ordinals, strings or None.\n",
      " |      Character keys will be then converted to ordinals.\n",
      " |      If there are two arguments, they must be strings of equal length, and\n",
      " |      in the resulting dictionary, each character in x will be mapped to the\n",
      " |      character at the same position in y. If there is a third argument, it\n",
      " |      must be a string, whose characters will be mapped to None in the result.\n",
      "\n"
     ]
    }
   ],
   "execution_count": 30
  },
  {
   "metadata": {},
   "cell_type": "code",
   "outputs": [],
   "execution_count": null,
   "source": "",
   "id": "c7f62fea13f393b4"
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
